<?php

//内容文章
class ArticleController extends FrontBaseC {

    //显示文章内容
    public function actionArticle() {
        $id = Yii::app()->request->getParam('id');
        $info = ContentArticlesModel::model()->getArticle($id);
        if (empty($info)) {
            $this->error('该文章不存在！');
        }
        $this->description = $info['description'];
        $this->keywords = $info['keywords'];
        $this->title = $info['title'];
        $this->assign('info', $info);
        $this->render();
    }

    public function actionShow() {
        $id = Yii::app()->request->getParam('id');
        SeoWord::setWord($this, 'getCatSeo', 'article-' . $id);
        $linksModel = new LinkModel();
        $links = $linksModel->getInsideLinks();
        $this->render('show', array(
            'id' => $id,
            'links' => $links,
        ));
    }

    public function actionAnquan() {
        $this->layout = 'theme.views.layouts.FrontNoHeaderContent';
        $id = Yii::app()->request->getParam('id');
        $this->render('anquan', array(
            'id' => $id,
        ));
    }

}
